﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ALDIOrganizer.Properties;

namespace ALDIOrganizer
{
    public partial class EditNotes : Form
    {
        private string _notes;
        private string _statusStripCaption;
        private Cell _cell;

        public string notes
        {
            get { return this._notes; }
        }

        public EditNotes()
        {
            InitializeComponent();
        }

        public EditNotes(string caption, Cell cell) : this()
        {
            _cell = cell;
            _statusStripCaption = caption;
            

        }

        private void tbNotes_TextChanged(object sender, EventArgs e)
        {
            _notes = tbNotes.Text;
            if (btnCancel.Text == Resources.FORM_EDITNOTES_Back)
                btnCancel.Text = Resources.FORM_EDITNOTES_Cancel;
        }

        private void formNotes_Resize(object sender, EventArgs e)
        {
            tbl1.Height = this.Height - 64;
        }

        private void formNotes_Load(object sender, EventArgs e)
        {
            btnCancel.Text = Resources.FORM_EDITNOTES_Back;
            tbNotes.Text = _cell.Notes;
            tbNotes.BackColor = Program.CurrentTheme.GetColour(Theme.AnyNotes).BackColour.Value;
            lblStatus.Text = _statusStripCaption;
        }

        private void formNotes_FormClosing(object sender, FormClosingEventArgs e)
        {
            
        }

        
        private void btnRemove_Click(object sender, EventArgs e)
        {
            _notes = String.Empty;        
        
        }

        
    }
}
